home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************************/
- /* TextResizeProc */
- /************************************************************************************/
-
- #include "MyHeaders.h"
-
- short TextResizeProc()
- {
- short TextResRetCode = 0;
- div_t r; /* work area for division */
-
- EraseRect (&windTbl[windSub].windRec.port.portRect);
-
- HideControl (windTbl[windSub].windCntlH[0]);
- SizeControl (windTbl[windSub].windCntlH[0], 16,
- windTbl[windSub].windRec.port.portRect.bottom -
- windTbl[windSub].windRec.port.portRect.top - 13);
- MoveControl (windTbl[windSub].windCntlH[0],
- windTbl[windSub].windRec.port.portRect.right - 15,
- windTbl[windSub].windRec.port.portRect.top - 1);
- ShowControl (windTbl[windSub].windCntlH[0]);
-
- workRect = windTbl[windSub].windRec.port.portRect;
- viewRect = workRect;
- viewRect.right -= 16;
- viewRect.top += 4;
- viewRect.bottom -= 16;
-
- r = div ((viewRect.bottom - viewRect.top),
- (**windTbl[windSub].windTEH[0]).lineHeight);
- viewRect.bottom -= r.rem;
-
- destRect = viewRect;
- destRect.right -= 6;
- destRect.left += 6;
- (**windTbl[windSub].windTEH[0]).viewRect = viewRect;
- (**windTbl[windSub].windTEH[0]).destRect = destRect;
- CursorSelect(NIL, NIL, watchCursor); /* set the cursor */
- TECalText(windTbl[windSub].windTEH[0]);
-
- TESelView(windTbl[windSub].windTEH[0]); /* scroll to carat */
-
- InvalRect (&windTbl[windSub].windRec.port.portRect);
-
- return TextResRetCode;
- }
-